import WJRequest from './request'
import { TIME_OUT, BASE_URL } from './config/index'
export const wjRequest = new WJRequest({
  baseURL: BASE_URL,
  timeout: TIME_OUT,
  interceptors: {
    requestSuccessInterceptors(config) {
      console.log('实例请求拦截成功')
      return config
    },
    requestErrorInterceptors(err) {
      console.log('实例请求拦截失败')
      return err
    },
    responseSuccessInterceptors(res) {
      console.log('实例响应拦截成功')
      return res
    },
    responseErrorInterceptors(err) {
      console.log('实例响应拦截失败')
      return err
    }
  }
})
